<?php
/**
 * Course Class Model
 *
 * Copyright 2012
 * @date 21-April-2012
 * @author
 * @version 0.0.1
 **/
class Question extends AppModel {
    
    const MULTICHOICE = 1;
    const CHECKBOX = 2;


    public function get_list(){
        $country_list = $this->find('list',array('fields'=>array('name')));
        return $country_list;
    }
    public static function get_name($id){
        $country = ClassRegistry::init('Question');
        $country->id = $id;
        return $country->field('name');
    }
    public static function get_types() {
        return array(self::MULTICHOICE=>"Multiple Choice",  self::CHECKBOX=>"Check Box");
    }
    public static function get_type($type){
        switch ($type) {
            case self::MULTICHOICE:
                return "Multiple Choise";
                break;
            case self::CHECKBOX:
                return "Check box";
                break;
        }
    }
}